using System;

namespace indexers
{
	/// <summary>
	/// Summary description for BitList.
	/// </summary>
	public class BitList
	{
		private int number;
		public BitList(string snum) {
			number = Convert.ToInt32 (snum);
		}
		//------
		// here is an indexer that
		//returns the i-th bit of a value
		public int this[int index] {
			get{
				int val = number >> index;
				return val & 1;
			}
		}
	}
}
